What is where does three sheets to the wind come from?

The phrase "three sheets to the wind" is believed to have originated from nautical terminology. In the past, sails on a ship were controlled by ropes called "sheets". If a sheet was not secured properly and blew free, the sail would flap around, making the ship unstable and difficult to control. If three sheets were blowing freely, the ship would be out of control and drifting aimlessly - just like a drunk person stumbling around without direction. Over time, the phrase became a colloquialism to refer to someone who is very drunk and uncoordinated.